# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname='perl-text-csv'
_dist="Text-CSV"
pkgver=2.00
pkgrel=2
pkgdesc="comma-separated values manipulator"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
url="https://metacpan.org/release/Text-CSV"
source=("https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/${_dist}-${pkgver}.tar.gz")
md5sums=('435951d381e814b5ce51f570a6a1dc24')
sha512sums=('ac41e8e1a56f30eac9076e8c53584186df83e4b1bf32ac52aef862ff7a02ada2801df2eac710b89e06901342c8513844d3dbbc86fc53d7a3d3da5f91f69dd88f')

unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT

build() {
    cd $_dist-$pkgver
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd $_dist-$pkgver
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd $_dist-$pkgver
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
